# Python使用字典格式化字符串
# 字符串模板中使用key
temp = '教程是：%(name)s, 价格是：%(price).2f，网址是：%(url)s'
course = {"name": "Python教程", "price": 9.9, "url": "http://c.biancheng.net/python/"}
# 使用字典为字符串模板中的key传入值
print(temp % course)
course = {"name": "C++教程", "price": 15.6, "url": "http://c.biancheng.net/cplus/"}
# 使用字典为字符串模板中的key传入值
print(temp % course)


